<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
	<title>积分明细=</title>
	<link href="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/wechat/frame/sui/css/SUI.css?b" rel="stylesheet" />
	<link href="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/wechat/css/other/all.css" rel="stylesheet" />
	<link href="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/wechat/css/app.css" rel="stylesheet" />
	<link href="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/wechat/font/iconfont.css" rel="stylesheet" />
	<link href="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/wechat/css/other/app.css?a" rel="stylesheet" />
	<link href="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/wechat/css/dropload.css" rel="stylesheet" />
	<link href="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/wechat/frame/mui/css/mui.min.css" rel="stylesheet" />
</head>
<style type="text/css">
	.mui-content>.mui-table-view:first-child{
		margin-top: 0px;
	}
	.mui-content { padding-bottom: 0; }
	.recharge { margin-top: 0; }
</style>
<body class="integral">
	<div class="mui-content">
		<div class="inteHd">
			<dl>
				<dt><i class="iconfont">&#xe81a;</i></dt>
				<dd>{{.integral}}</dd>
			</dl>
			<button class="goto" href="/mobile/my/integral">积分兑换</button>
			<span class="goto" href="/mobile/my/integral_rule"><i class="iconfont">&#xe724;</i>积分规则</span>
		</div>
		<div class="suiLineBox strong">
			{{range .info}}
			<dl>
				{{if eq .type "0"}}
				<dt>消费返积分[{{.ordernum}}]</dt>
				<dd class="recharge">+{{.number}}</dd>
				{{else}}
				<dt>积分兑换[{{.title}}]</dt>
				<dd class="recharge">-{{.number}}</dd>
				{{end}}
			</dl>
			{{end}}
		</div>
	</div>
</body>
</html>
<script src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/wechat/frame/mui/js/mui.min.js"></script>
<script type="text/javascript" src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/wechat/frame/sui/js/SUI.js"></script>
<script src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/wechat/js/zepto.min.js"></script>
<script src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/wechat/js/dropload.min.js"></script>
{{template "wechat/public/share.html" .}}
<script>
	   var page=2
$('.element').dropload({
    scrollArea : window,
    threshold: 2,
    loadDownFn : function(me){
        $.ajax({
            type: 'GET',
            url: window.location.href,
            dataType: 'json',
            data:{page:page},
            success: function(data){
               page+=1
               var res=data.info
              if(res){
                 for (var i=0;i<res.length;i++){
                    var div = document.createElement('dl');
                    var html='';
                    if(res[i].type==0){
                    	html=`<dt>消费返积分[`+res[i].ordernum+`]</dt>
                    	<dd class="recharge">+`+res[i].number+`</dd>`
                    }else{
                    	html=`<dt>积分兑换[`+res[i].title+`]</dt>
                    	<dd class="recharge">-`+res[i].number+`</dd>`
                    }
                    div.innerHTML=html
                    document.getElementsByClassName('suiLineBox')[0].appendChild(div)
                }
                fitchange()
                me.resetload();
                }else{
                    mui.toast("没有更多了！");
                    $(".dropload-down").remove();
                }
            },
            error: function(xhr, type){
                mui.toast("网络慢，请重新刷新!");
                me.resetload();
            }
        });
    }
});
</script>